import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppMessage } from './app.message';
import { UserController } from './controller/user.controller';
import { CommonModule } from 'common/lib/utils/common.module';

import { AuthController } from './controller/auth.controller';
import { JwtModule } from '@nestjs/jwt';
import { jwtConstants} from "common/lib/passport/constants"
import { AuthService } from './service/auth.service';
import { UserService } from './service/user.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UsersEntity } from 'common/lib/entities/user.entity';
import { VerificationCodeController } from './controller/verification.code.controller';
import { ToolsService } from 'common/lib/utils/tools.service';
import { PassportModule } from '@nestjs/passport';
import {LocalStrategy} from "common/lib/passport/local.strategy"
import { JwtStrategy } from 'common/lib/passport/jwt.strategy';



@Module({
  imports: [
    CommonModule,
    TypeOrmModule.forFeature([UsersEntity]),
    JwtModule.register({
      secret: jwtConstants.secret,
      signOptions: { expiresIn: '24h' },
    }),
  ],
  controllers: [AppController, AppMessage, UserController,AuthController,VerificationCodeController],
  providers: [ UserService,AuthService,ToolsService],
  exports: [],
})
export class AppModule {}
